package org.pih.javarosa.migration.export;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.jdom.JDOMException;
import org.pih.migration.load.objects.Protocol;
import org.pih.migration.load.objects.WorksheetExtractor;
import org.pih.migration.load.objects.WorksheetParser;
import org.pih.migration.load.objects.XFormBuilder;

public class AdultDosageProcessor {
	public static void main(String[] args) {
		try {
			new AdultDosageProcessor();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public AdultDosageProcessor() throws JDOMException, IOException {

		List<Protocol> protocols = new ArrayList<Protocol>();
		List<Worksheet> worksheets = new WorksheetExtractor().extract("Adult Medication 07.27.2010.xml");
		for (Worksheet worksheet : worksheets) protocols.add(new WorksheetParser().parse(worksheet));
		
		for (Protocol protocol : protocols) {
			new XFormBuilder().build(protocol);
			break;
		}

	}


}